package org.ru.mse10.cvis.service;

import javax.ejb.Asynchronous;
import javax.ejb.Stateless;
import javax.ejb.Timer;

/**
 * The Class BatchJobTimer.
 */
@Stateless
public class BatchJobTimer {

	/**
	 * Execute job.
	 * 
	 * @param timer
	 *            the timer
	 */
	@Asynchronous
	public void executeJob(Timer timer) {
		// CVSearchCriteria jobSearchInfo = (CVSearchCriteria) timer.getInfo();
		System.err.println(timer.getInfo());
		System.err.println(timer.getNextTimeout());
		System.err.println(timer.getSchedule());
		try {
			Thread.sleep(30000); // Sleep for 30 seconds
		} catch (InterruptedException ex) {
		}
	}
}
